package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 普通入库
 *
 * @TableName normal_warehousing
 */
@TableName(value = "normal_warehousing")
@Data
public class NormalWarehousing implements Serializable {
    /**
     * 入库主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 入库单号
     */
    private String code;

    /**
     * 入库主题
     */
    private String inboundTheme;

    /**
     * 入库类型
     */
    private String inboundType;

    /**
     * 入库日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inboundDate;

    /**
     * 采购单号外键
     */
    private String purchaseNumber;

    /**
     * 入库申请人
     */
    private String inboundApplicants;

    /**
     * 所在部门
     */
    private String department;

    /**
     * 仓库外键
     */
    private String warehouse;

    /**
     * 仓库管理员
     */
    private String warehouseAdministrator;

    /**
     * 入库人员
     */
    private String inboundPersonnel;

    /**
     * 入库人员所在部门
     */
    private String department2;

    /**
     * 归还原因
     */
    private String alsoReason;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date creationTime;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updated;

    /**
     * 逻辑删除
     */
    private Integer is_delete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NormalWarehousing other = (NormalWarehousing) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
                && (this.getInboundTheme() == null ? other.getInboundTheme() == null : this.getInboundTheme().equals(other.getInboundTheme()))
                && (this.getInboundType() == null ? other.getInboundType() == null : this.getInboundType().equals(other.getInboundType()))
                && (this.getInboundDate() == null ? other.getInboundDate() == null : this.getInboundDate().equals(other.getInboundDate()))
                && (this.getPurchaseNumber() == null ? other.getPurchaseNumber() == null : this.getPurchaseNumber().equals(other.getPurchaseNumber()))
                && (this.getInboundApplicants() == null ? other.getInboundApplicants() == null : this.getInboundApplicants().equals(other.getInboundApplicants()))
                && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment()))
                && (this.getWarehouse() == null ? other.getWarehouse() == null : this.getWarehouse().equals(other.getWarehouse()))
                && (this.getWarehouseAdministrator() == null ? other.getWarehouseAdministrator() == null : this.getWarehouseAdministrator().equals(other.getWarehouseAdministrator()))
                && (this.getInboundPersonnel() == null ? other.getInboundPersonnel() == null : this.getInboundPersonnel().equals(other.getInboundPersonnel()))
                && (this.getDepartment2() == null ? other.getDepartment2() == null : this.getDepartment2().equals(other.getDepartment2()))
                && (this.getAlsoReason() == null ? other.getAlsoReason() == null : this.getAlsoReason().equals(other.getAlsoReason()))
                && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
                && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
                && (this.getCreationTime() == null ? other.getCreationTime() == null : this.getCreationTime().equals(other.getCreationTime()))
                && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
                && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(other.getUpdated()))
                && (this.getIs_delete() == null ? other.getIs_delete() == null : this.getIs_delete().equals(other.getIs_delete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getInboundTheme() == null) ? 0 : getInboundTheme().hashCode());
        result = prime * result + ((getInboundType() == null) ? 0 : getInboundType().hashCode());
        result = prime * result + ((getInboundDate() == null) ? 0 : getInboundDate().hashCode());
        result = prime * result + ((getPurchaseNumber() == null) ? 0 : getPurchaseNumber().hashCode());
        result = prime * result + ((getInboundApplicants() == null) ? 0 : getInboundApplicants().hashCode());
        result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode());
        result = prime * result + ((getWarehouse() == null) ? 0 : getWarehouse().hashCode());
        result = prime * result + ((getWarehouseAdministrator() == null) ? 0 : getWarehouseAdministrator().hashCode());
        result = prime * result + ((getInboundPersonnel() == null) ? 0 : getInboundPersonnel().hashCode());
        result = prime * result + ((getDepartment2() == null) ? 0 : getDepartment2().hashCode());
        result = prime * result + ((getAlsoReason() == null) ? 0 : getAlsoReason().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        result = prime * result + ((getIs_delete() == null) ? 0 : getIs_delete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", inboundTheme=").append(inboundTheme);
        sb.append(", inboundType=").append(inboundType);
        sb.append(", inboundDate=").append(inboundDate);
        sb.append(", purchaseNumber=").append(purchaseNumber);
        sb.append(", inboundApplicants=").append(inboundApplicants);
        sb.append(", department=").append(department);
        sb.append(", warehouse=").append(warehouse);
        sb.append(", warehouseAdministrator=").append(warehouseAdministrator);
        sb.append(", inboundPersonnel=").append(inboundPersonnel);
        sb.append(", department2=").append(department2);
        sb.append(", alsoReason=").append(alsoReason);
        sb.append(", remark=").append(remark);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", creationTime=").append(creationTime);
        sb.append(", updater=").append(updater);
        sb.append(", updated=").append(updated);
        sb.append(", is_delete=").append(is_delete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}